// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdScreen
 */
public class AdScreenDaoImpl
    extends org.tinaelle.server.domain.AdScreenDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdScreenDao#toAdScreenDTO(org.tinaelle.server.domain.AdScreen)
     */
    public org.tinaelle.common.dto.AdScreenDTO toAdScreenDTO(final org.tinaelle.server.domain.AdScreen entity)
    {
        return super.toAdScreenDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdScreen loadAdScreenFromAdScreenDTO(org.tinaelle.common.dto.AdScreenDTO adScreenDTO)
    {
        org.tinaelle.server.domain.AdScreen adScreen = this.load(adScreenDTO.getAdScreenId());
        if (adScreen == null)
        {
            adScreen = org.tinaelle.server.domain.AdScreen.Factory.newInstance();
        }
        return adScreen;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdScreenDao#adScreenDTOToEntity(org.tinaelle.common.dto.AdScreenDTO)
     */
    public org.tinaelle.server.domain.AdScreen adScreenDTOToEntity(org.tinaelle.common.dto.AdScreenDTO adScreenDTO)
    {
        org.tinaelle.server.domain.AdScreen entity = this.loadAdScreenFromAdScreenDTO(adScreenDTO);
        this.adScreenDTOToEntity(adScreenDTO, entity, true);
        return entity;
    }
}